package ch.ti.bfh.app.loodel.domain.invitation;

import ch.ti.bfh.app.loodel.domain.learningEvent.LearningEvent;
import ch.ti.bfh.app.loodel.domain.member.Member;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.Entity;

@Entity
public class GuestLearningEventInvitation extends LearningEventInvitation {

    @NotBlank
    @Email
    private String guestEMail;

    public GuestLearningEventInvitation(LearningEvent learningEvent, Member sender, String guestEMail) {
        super(learningEvent, sender);
        this.guestEMail = guestEMail;
    }

    protected GuestLearningEventInvitation() {
    }

    @Override
    public String getEMail() {
        return guestEMail;
    }
}
